package com.wtwd.campus.service.impl;

import com.wtwd.campus.dao.DeviceSettingMapper;
import com.wtwd.campus.entity.DeviceSetting;
import com.wtwd.campus.service.DeviceSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DeviceSettingServiceImpl implements DeviceSettingService {
    @Autowired
    private DeviceSettingMapper deviceSettingMapper;
    @Override
    public DeviceSetting getDeviceSettingByImei(String imei ) {
        return deviceSettingMapper.getDeviceSettingByImei(imei);
    }

    @Override
    public Integer modifyDeviceSetting(DeviceSetting deviceSetting) {
        return deviceSettingMapper.modifyDeviceSetting(deviceSetting);
    }

    @Override
    public DeviceSetting getDeviceSettingByDeviceId(Integer deviceId) {
        return deviceSettingMapper.getDeviceSettingByDeviceId(deviceId);
    }

    @Override
    public int modifySilentSwitchByDeviceId(Integer deviceId,Integer flag) {
        return deviceSettingMapper.modifySilentSwitchByDeviceId(deviceId, flag);
    }
}
